package com.caiheng.api.service.platfom;

import com.caiheng.api.entity.estate.EstateChat;
import com.caiheng.api.entity.estate.EstateUser;
import com.caiheng.api.entity.estate.PropertyFeeOrder;
import com.caiheng.api.entity.estate.RepairRecord;
import com.caiheng.api.entity.examine.ExamineApprove;
import com.caiheng.api.entity.examine.ExamineApproveRegAdminRecord;
import com.caiheng.api.entity.examine.ExamineApproveRegRecord;
import com.caiheng.api.entity.examine.ExamineApproveTemplateUser;
import com.caiheng.api.entity.mer.Mer;
import com.caiheng.api.entity.product.ProductOrder;
import com.caiheng.api.entity.setmeal.SetMealOrder;
import com.caiheng.api.entity.wxmsg.WxTemplate;
import com.caiheng.api.entity.wxuser.User;
import com.caiheng.api.service.base.BaseService;

/**
 * 微信公众号模板消息
 * @author mr.zhou
 * @email zhouwei_nice@163.com
 * @date 2020-12-15 22:36:23
 */
public interface WxTemplateService extends BaseService<WxTemplate> {

    /**
     *  普通订单退款成功 公众号推送消息
     * @param user
     * @param order
     * @param template_type
     * @return
     */
    int sendWxMsgRefundProduct(User user, ProductOrder order, Integer template_type);

    /**
     *  普通订单退款成功 公众号推送消息
     * @param user
     * @param order
     * @param template_type
     * @return
     */
    int sendWxMsgRefundSetMeal(User user, SetMealOrder order, Integer template_type);

    /**
     * 发送物业交费成功通知  公众号推送
     * @param user
     * @param feeOrder
     * @return
     */
    int sendWxMsgAddPropertyOrder(User user, PropertyFeeOrder feeOrder);

    /**
     *  报修成功 公众号推送消息
     * @param repairRecord
     * @return
     */
    int sendWxMsgRepair(RepairRecord repairRecord, int isEnd);

    /**
     *  报修成功 公众号推送消息
     * @param repairRecord
     * @param estateUser
     * @return
     */
    int sendWxMsgRepairToWorker(RepairRecord repairRecord, EstateUser estateUser, int isEnd);

    /**
     * 商家入驻申请
     * @param user
     * @param mer
     * @return
     */
    int sendWxMsgMerRegister(User user,Mer mer);

    /**
     *  物业经理接待通知
     * @param estateChat
     * @return
     */
    int sendWxMsgEstateChatToManager(EstateChat estateChat);

    /**
     *  审批结果抄送通知
     * @param templateUser
     * @param adminRecord
     * @return
     */
    int sendWxMsgExamineApprove(ExamineApprove examineApprove,ExamineApproveTemplateUser templateUser, ExamineApproveRegRecord regRecord, ExamineApproveRegAdminRecord adminRecord, int isEnd);


    /**
     *  审批待处理通知
     * @param templateUser
     * @param adminRecord
     * @return
     */
    int sendWxMsgExamineApproveToNext(ExamineApprove examineApprove, ExamineApproveTemplateUser templateUser, ExamineApproveRegRecord regRecord, ExamineApproveRegAdminRecord adminRecord, int isEnd);


    /**
     *  审批结果通知  给用户
     * @param examineApprove
     * @param user
     * @param regRecord
     * @return
     */
    int sendWxMsgExamineApproveToUser(ExamineApprove examineApprove, User user, ExamineApproveRegRecord regRecord);

    /**
     *  重置AccessToken
     * @param type   0 - 公众号  1 - 精彩e家小程序  2 - 彩恒云
     * @return
     */
    String getAccessToken(int type);
}
